package com.cloudcc.cloudframe.ui.bitmap;

import android.graphics.Bitmap;

import com.cloudcc.mobile.R;
import com.nostra13.universalimageloader.core.DisplayImageOptions;
import com.nostra13.universalimageloader.core.assist.ImageScaleType;

public class DisplayerHelper {

	public static DisplayImageOptions getImageLogo() {

		DisplayImageOptions displayOptions = new DisplayImageOptions.Builder()
				.displayer(new CircleBitmapDisplayer()).cacheInMemory(true)
				.cacheOnDisc(true).cacheOnDisc(true)
				.showImageOnFail(R.drawable.person110)
				.showImageOnLoading(R.drawable.person110)
				.bitmapConfig(Bitmap.Config.RGB_565).delayBeforeLoading(1000)
				.imageScaleType(ImageScaleType.EXACTLY_STRETCHED).build();
		return displayOptions;
	}

	/**
	 * 圆形的用户头像
	 * 
	 * @return
	 */
	public static DisplayImageOptions getCircleUserLogoOptions() {

		DisplayImageOptions displayOptions = new DisplayImageOptions.Builder()
				.displayer(new CircleBitmapDisplayer()).cacheInMemory(true)
				.cacheOnDisc(true).cacheOnDisc(true)
				.showImageOnFail(R.drawable.person110)
				.showImageOnLoading(R.drawable.person110)
				.imageScaleType(ImageScaleType.EXACTLY_STRETCHED).build();
		return displayOptions;
	}

}
